package com.kingint.web.portal.base.controller;


import com.kingint.common.unitedresult.K;
import com.kingint.mbg.bas.entity.BasWarrantyItems;
import com.kingint.web.portal.base.service.WarrantyItemsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/warrantyItems")
@Api(value = "WarrantyItemsController", description = "前端保修物品控制层")
@CrossOrigin
public class WarrantyItemsController {

    @Resource
    private WarrantyItemsService warrantyItemsService;

    @ApiOperation(value = "获取保修物品信息")
    @GetMapping("/getWarrantyItemsList")
    public Object getWarrantyItemsList(){
        List<BasWarrantyItems> warrantyItems = warrantyItemsService.warrantyItemsList();
        return K.ok().data(warrantyItems);
    }
}
